#include "rd_data_ctrl.h"
#include "wireless.h"
#if (WIRELESS_8KEY == 1)
uint8_t uc_rd_key01 = 0;
uint8_t uc_rd_key02 = 0;
uint8_t uc_rd_key03 = 0;
uint8_t uc_rd_key04 = 0;
uint8_t uc_rd_key05 = 0;
uint8_t uc_rd_key06 = 0;
uint8_t uc_rd_key07 = 0;
uint8_t uc_rd_key08 = 0;
uint8_t uc_rd_key_emorgency_stop = 0;
#endif

uint32_t ul_rd_rx_none_data_cnt = 0;
uint8_t uc_rd_rolling_counter_last = 0;
/**
 * @brief 无线数据解析，放到50ms定时任务中
 */
void rd_data_analysis(void)
{
	#if (PROCS_PROTOCOL == 1)
    if(ub_rd_rx_data.data.rollingCounter != uc_rd_rolling_counter_last)
    {
        ul_rd_rx_none_data_cnt = 0;
        uc_rd_rolling_counter_last = ub_rd_rx_data.data.rollingCounter;
        
    }
    else
    {
        ul_rd_rx_none_data_cnt++;
        if(ul_rd_rx_none_data_cnt > 10)
        {
            uc_rd_key01 = 0;
            uc_rd_key02 = 0;
            uc_rd_key03 = 0;
            uc_rd_key04 = 0;
            uc_rd_key05 = 0;
            uc_rd_key06 = 0;
            uc_rd_key07 = 0;
            uc_rd_key08 = 0;
            uc_rd_key_emorgency_stop = 0;
        }
    }
		#endif
       
}









